/**
 * @Author：ming
 * @Date：2023/10/2 9:39 PM
 * @Filename：Hj8
 */

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.HashSet;
import java.util.LinkedHashSet;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * @author ming
 */
public class Hj9 {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String str ;
        while ((str=br.readLine())!=null){
            HashSet<Character> set = new LinkedHashSet<>();
            char[] cc = str.toCharArray();
            for (int i = cc.length-1; i >=0; i--) {
                if(!set.contains(cc[i])){
                    set.add(cc[i]);
                }
            }
            StringBuilder sb = new StringBuilder();
            for (Character c : set) {
                sb.append(c);
            }
            System.out.println(sb.toString());
        }
    }
}
